{% extends "base_site.html" %}

{% block content %}

<script type="text/javascript" src="/admin/jsi18n/"></script>
<script type="text/javascript" src="/media/js/core.js"></script>
<script type="text/javascript" src="/media/js/calendar.js"></script>
<script type="text/javascript" src="/media/js/admin/DateTimeShortcuts.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript" src="/media/js/jquery.min.js"></script>
<script type="text/javascript" src="/media/js/jquery.init.js"></script> 
<script type="text/javascript" src="/media/js/actions.min.js"></script>
<style>
td.center{vertical-align:middle;}
td,th {font-size: 11px;line-height: 13px;border: 1px solid #000000;vertical-align: top;padding: 5px;}
</style>
<table>
    <th style="width:70px;">Date</th><th>Network config change</th><th>Tickets</th><th>Relate ticket</th>
    {%for l in data%}
    <tr><td class="center">{{l.date}}</td><td>
	{%for i in l.svn.content%}
		{%if i.0 == '@'%}&nbsp;&nbsp;&nbsp;&nbsp;{{i}}<br>{%else%}
		{%if i.0 == '-' %}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strike>{{i}}</strike><br>{%else%}
		{%if i.0 == '+' %}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{i}}<br>{%else%}
		{{i}}<br>{%endif%}{%endif%}{%endif%}
	{%endfor%}
	</td><td>
	{% for i in l.ticket%}
	<a href="http://ticket.mozat.com/ticket/mainIndex/?url=Ticket/IdcView/{{i.id}}" target="_blank">({{i.id}}){%if i.label%}{{i.label}} | {%endif%}{{i.subject}}</a>{%if i.external_ip or i.internal_ip%}<br>({{i.external_ip}}:{{i.external_port}}-->{{i.internal_ip}}:{{i.internal_port}}){%endif%}<br>{%endfor%}</td><td>{%if l.svn%}
		<form action="">
			<input type="text" name="tid" value="{{l.relatedTicket}}" style="width:40px;"/>
			<input type="hidden" name="date" value="{{l.date}}"/>
			<input type="submit" value="relate"></form>{%endif%}</td></tr>{%endfor%}
        </table>
    </div>
{% endblock %}

